import request from '@/utils/request'

// 创建立项项目
export function creatProjectInfo(data) {
  return request({
    url: `/project-init/create`,
    method: 'post',
    data
  })
}

// 提交调研
export function submitResearch(params) {
  return request({
    url: `/project-init/research/commit`,
    method: 'get',
    params
  })
}

// 编辑立项项目
export function editProjectInfo(data) {
  return request({
    url: `/project-init/update`,
    method: 'put',
    data
  })
}

// 自研立项列表
export function selfProjectList(data) {
  return request({
    url: `/project-init/list`,
    method: 'post',
    data
  })
}

// 获取自研立项项目详情
export function projectInfoDetail(params) {
  return request({
    url: `/project-init/detail`,
    method: 'get',
    params
  })
}

// 通过flowID获取自研立项项目详情---公共审核列表过来的
export function projectInfoDetailByFlowId(params) {
  return request({
    url: `/project-init/flow-id/detail`,
    method: 'get',
    params
  })
}

// 获取立项审批详情
export function auditDetail(params) {
  return request({
    url: `/project-init/check/detail`,
    method: 'get',
    params
  })
}

// 通过flowID获取立项审批详情---公共审核列表过来的
export function auditDetailByFlowId(params) {
  return request({
    url: `/project-init/check/flow-id/detail`,
    method: 'get',
    params
  })
}

// 立项项目删除
export function projectInfoDelete(params) {
  return request({
    url: `/project-init/delete`,
    method: 'delete',
    params
  })
}

// 已同意立项的列表
export function agreeProjectList(params) {
  return request({
    url: `/project-init/agree/list`,
    method: 'get',
    params
  })
}

// 部门尽调信息保存
export function saveLookInfo(data) {
  return request({
    url: `/project-init/department/research/info/save`,
    method: 'put',
    data
  })
}

// 获取参与调查部门，以及是否提交了调查报告
export function lookInfoList(params) {
  return request({
    url: `/project-init/department/if-commit`,
    method: 'get',
    params
  })
}

// 启动、回退调研
export function returnResearch(params) {
  return request({
    url: `/project-init/research/start`,
    method: 'get',
    params
  })
}

// 启动、回退调研
export function returnLookInfo(data) {
  return request({
    url: `/project-init/research/back`,
    method: 'post',
    data
  })
}

// 尽调表获取总经理意见
export function generalManagerIdea(params) {
  return request({
    url: `/project-init/step/people/info`,
    method: 'get',
    params
  })
}

// 申请决议
export function applyResolution(params) {
  return request({
    url: `/project-init/resolution/apply`,
    method: 'get',
    params
  })
}

// 审批决议
export function resolutionEvaluate(data) {
  return request({
    url: `/project-init/resolution/check`,
    method: 'post',
    data
  })
}

// 立项审批列表
export function approveList(data) {
  return request({
    url: `/project-init/check/list`,
    method: 'post',
    data
  })
}

// 提交立项审批
export function submitApproval(data) {
  return request({
    url: `/project-init/check/create`,
    method: 'post',
    data
  })
}

// 立项审批编辑
export function approvalEdit(data) {
  return request({
    url: `/project-init/check/update`,
    method: 'put',
    data
  })
}

// 立项审批
export function projectApproval(data) {
  return request({
    url: `/project-init/info/check`,
    method: 'post',
    data
  })
}

// 自研立项操作日志
export function operationLog(data) {
  return request({
    url: `/project-init/history/list`,
    method: 'post',
    data
  })
}

// 立项审批操作记录
export function auditOperationLog(data) {
  return request({
    url: `/project-init/check/history/list`,
    method: 'post',
    data
  })
}

// 待我处理的列表
export function waitingTaskList(data) {
  return request({
    url: `/project-init/my/wait/list`,
    method: 'post',
    data
  })
}

// 会议记录列表
export function meetingList(data) {
  return request({
    url: `/project-start/transaction/meeting/list`,
    method: 'post',
    data
  })
}

// 获取审批意见数据
export function approvalOpinion(params) {
  return request({
    url: `/project-init/check/step/people/info`,
    method: 'get',
    params
  })
}
